<template>
  <div>
    <!-- 通过率/达标率 -->
    <Echart :id="'card' + Date.now()" :options="options" height="100%" width="100%" />
  </div>
</template>

<script>
import Echart from '@/common/echart'
export default {
  components: {
    Echart
  },
  props: {
    data: {// 父传子
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data() {
    return {
      options: {
      }
    }
  },
  watch: {
    // tips 是会变更的数据，所以进行监听
    data: {
      handler(newData) {
        this.options = newData
      },
      immediate: true,
      deep: true
    }
  }
}
</script>

<style lang="scss" scoped></style>